<meta http-equiv="Content-Type" content="text/html; charset=utf8">
<LINK REL="stylesheet" HREF="../../templates/css/style.css" TYPE="text/css">
<LINK rel="stylesheet" href="../../templates/css/dialog.css" type="text/css">
<script language="javascript" src="../../templates/js/tab.js"></script>
<script language="javascript" type="text/javascript" src="../../lib/cate.js"></script>
<script language="javascript" type="text/javascript">
<!--
var oTabs = new Object() ;
function check_form()
{
var k = objSorts.childNodes.length;
cur_num = k - 1;
cur_list = document.getElementById("sel_" + cur_num);
cur_value = cur_list.value;
if (cate[cur_value] || cur_value == "")
{
  alert("請選擇分類!");
  return false;
}
obj = document.add_news.ch_headline;
if( obj.value == "")
{
   alert("請至少輸入標題!");
   return false;
}
obj_form = document.add_news;
obj_form.cate_id.value = cur_value;
obj.submit;
} //End fun
//-->
//多圖片上传代码
function add_inp(){ 
	newInp = document.createElement("input") 
	newInp.setAttribute("type","file") 
	newInp.setAttribute("name","upfile[]") 
	div1.appendChild(newInp) 
	newInp = document.createElement("br") 
	div1.appendChild(newInp) 
} 
function del_inp(){ 
	childlen=div1.childNodes.length 
	childlen-- 
	div1.removeChild(div1.childNodes[childlen]) 
	childlen-- 
	div1.removeChild(div1.childNodes[childlen]) 
} 

</script>
<table width="98%" border="0" class="table2">
<tr>
<td>管理中心 - 文章管理 - 添加文章</td>
</tr>
</table>
<form method="post" name="add_news" onsubmit="return check_form()" enctype="multipart/form-data" >
<table cellpadding=0 cellspacing=3 width=98% align="center" style="border:1px solid #A5ADC4">
<input type=hidden name=add value=1 />
    <tr id="TabsRow" style="">
	     <td colspan="2" class="PopupTabArea">
         <!--<span style="font-weight:bold;padding-left:10px"> 添加新聞</span>-->
		    <table width="6%" border="0" cellpadding="0" cellspacing="0">
           	  <tr id="Tabs" onselectstart="return false;">
	             <td width="4%" class="PopupTabEmptyArea">&nbsp;</td>
                 <td class="PopupTabEmptyArea" width="96%">&nbsp;</td>
         	  </tr> 	
            </table></td>
     </tr>	  
<tr id="chinese">
<th colspan="2">
<table width="100%" border="0" cellspacing="2" cellpadding="2">
<tr>
  <td width="7%" align="right" ><b>選擇分類: </b></td>
  <td width="93%"> {SHOW_CATE} </td>
</tr>
<tr>
  <td width="7%" align="right" ><b>標題: </b></td>
  <td width="93%"><input name="ch_headline" type="text" value="" size="40" maxlength="30" /></td>
</tr>
  <tr>
	<th width="7%" align="right">作者:</th>
	<td width="93%"><input name="ch_source" type="text" value="" size="40" maxlength="30" /></td>
  </tr>
<!--
<tr>
  <td width="13%" align="right" ><b>发布时间: </b></td>
  <td width="88%"><input name="date_added" type="text" value="{TIME}" /></td>
</tr>
-->
  <tr>
	<th width="7%" align="right">缩略图:</th>
	<td width="93%"><input type="file" name="img" /> 房產新聞,家具生活 有效: 200 * 150</td>
  </tr>

  <tr>
	<th align="right" valign="top">內容:</th>
	<td>{CHINESE_EDIT}</td>
  </tr>
<!-- 
  <tr>
	<th align="right" valign="top">附件:</th>	
	<th align="left">
	<div id=div1>	</div> 
	<INPUT TYPE="button" VALUE="增加上传" onclick=add_inp() class="bot"> 
	<INPUT TYPE="button" VALUE="减少上传" onclick=del_inp() class="bot"><br> 
	</td> 
  <tr>
 --> 
    <td colspan="2"><div align="center">
  <input type="hidden" name="cate_id" value="" />
  <input name="btn_sub" type="submit" id="btn_sub" value="確 定" class="bot" />
  <input name="reset" type="reset" id="reset" value="重 填" class="bot" />
  <input name="btn_ret" type="button" id="btn_ret" value="返 回" onclick="location.href='?action=news'" class="bot" />
    </div></td>
  </tr>
  </table>
  </th>
</tr>
<!--英文-->
<!--
<tr id="english">
<th colspan="2">
<table width="100%" border="0" cellspacing="2" cellpadding="2">
<tr>
  <td width="13%" align="right" ><b>英文标题: </b></td>
  <td width="88%"><input name="en_headline" type="text" value="{en_headline}" /></td>
</tr>
<tr>
	<th width="13%" align="right">英文来源:</th>
	<td width="88%"><input name="en_source" type="text" id="ZH" value="KingRoad" /></td>
</tr>
<tr>
	<th align="right" valign="top">英文内容:</th>
	<td>{ENGLISH_EDIT}</td>
</tr>
   <td colspan="2"><div align="center">
  <input name="btn_sub" type="submit" id="btn_sub" value="确 定" class="bot" />
  <input name="reset" type="reset" id="reset" value="重 填" class="bot" />
  <input name="btn_ret" type="button" id="btn_ret" value="返 回" onclick="location.href='?action=news'" class="bot" />
    </div></td>
  </tr>
  </table>
  </th>
</tr>
-->
 </table>
</form>
<script type="text/javascript" language="javascript">
<!--   
   AddTab("chinese", '文章發布', false );
   //AddTab("english", '英文资料', false ); 
   SetSelectedTab("chinese");
//-->
</script>
